/* StatisticsACC.java
 *
 * Created on 2007-nov-17, 13:41:19
 *
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package grex.fitnessfunctions;

import grex.GP;
import grex.Options;
import grex.genes.GeneException;

import java.io.Serializable;

/**
 *
 * @author RIK
 */
public class SelectionFunction implements Serializable {

    Options ops;
    double avgPerformance=-1;
    public double calcACC(GP gp) {
        return 0;
        /*try {
            ops = gp.getOptions();
  //          gp.execute(gp.getPcSelect());
            double trainAcc = 0;
            double selectAcc = 0;
            if(ops.getFITNESS_FUNCTION().contains("AUC")){
                ErrorAUC sacc = new ErrorAUC();
                trainAcc = sacc.calcAUC(gp,gp.getPcTrain());
    //            selectAcc = sacc.calcAUC(gp,gp.getPcSelect());
            }else{
                ErrorACC sacc = new ErrorACC();
                trainAcc = sacc.calcACC(gp, gp.getPcTrain());
      //          selectAcc = sacc.calcACC(gp, gp.getPcSelect());
            }
            if(ops.getPROBLEM_TYPE()==ops.CLASSIFICATION)
                return trainAcc + selectAcc * ops.getSELECTION_IMPORTANCE();
            else
                return - Math.abs(trainAcc - selectAcc);// * ops.getSELECTION_IMPORTANCE();
        } catch (GeneException ex) {
            return -1;
        }*/
    }
    
}

